package cn.jja8.config.tool.work.obj.common;

import java.net.MalformedURLException;
import java.net.URL;

public class KeepURL implements CommonKeep<URL> {

    @Override
    public URL in(Object con) {
        try {
            return new URL(con.toString());
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }

    @Override
    public Object out(URL url) {
        return url.toString();
    }
}
